﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Content;

namespace Projektet.Controller
{
    class SoundController
    {
        private Song _music;
        private float _duration;
        private float _maxDuration;

        const bool m_bVasquezIsGay = true;

        public SoundController() 
        {
            _maxDuration = 354000f;
        }

        public void LoadContent(ContentManager contManager)
        {
            _music = contManager.Load<Song>("DST-BattleAxe");
            MediaPlayer.Play(_music);
        }

        public void Update(GameTime gameTime)
        {
            _duration += gameTime.ElapsedGameTime.Milliseconds;
            //Console.WriteLine(_duration);
            if(_duration > _maxDuration)
            {
                MediaPlayer.Play(_music);
            }
        }
    }
}
